<%= form_for(@author, html: {class: "form-horizontal"}) do |f| %>
<% if @author.errors.any? %>
<div id="error_explanation">
	<div class="alert alert-danger">
		<p style="margin: 0px 20px"><%= t(:form_contains, ile: @author.errors.count) %> </p>
		
		<ul>
            <% @author.errors.full_messages.each do |msg| %>
            <li>
                * <%= msg %>
            </li>
            <% end %>
        </ul>
		
	</div>
	
</div>
<% end %>

	<div class="span6 offset3">
	    <div class="form-group">
           <%= f.label :name, titleize(t(:name)), class: 'col-sm-2 control-label' %>
           <div class="col-sm-10">
                <%= f.text_field :name, class: 'form-control' %> 
           </div>
        </div>
        
        <div class="form-group">
           <%= f.label :surname, titleize(t(:surname)), class: 'col-sm-2 control-label' %>
           <div class="col-sm-10">
                <%= f.text_field :surname, class: 'form-control' %> 
           </div>
        </div>
        <br />
        <div class="form-group">
             <div class="col-sm-offset-2 col-sm-10">
                <%= f.submit titleize(t(:save)), class: "btn btn-primary"  %>
             </div>
        </div>

	</div>
<% end %>
